function _sleep(ms) {
  const endTime = +new Date() + ms;
  while (+new Date() < endTime) {
    // do nothing
  }
}

function print() {
  console.log(+new Date());
}

console.log("11111");

_sleep(10000);

console.log("22222");
